package dictionary;

import dictionary.stemming.Stemmer;




public class StemmerDictionary extends AbstractDictionary {
	
	private Stemmer stemmer;
	
	public StemmerDictionary(Stemmer stemmer) {
		this.stemmer = stemmer;
	}
	
	private String getStemmedWord(String word) {
		return stemmer.stem(word);
	}
	
	@Override
	public boolean isValidWord(String word) {
		return super.isValidWord(getStemmedWord(word));
	}
	
	public String getWordAttributeEquivalent(String word) {
		return super.getWordAttributeEquivalent(getStemmedWord(word));
	}

}
